<script>
    function Http({ url = "", type = "get", data = {} }) {
        return new Promise((resolve, reject) => {
            $.ajax({
                url,
                type,
                data,
                success(res) {
                    console.log(res)
                    resolve(res)
                    resolve([null, res])
                },
                error(err) {
                    // console.log(err)
                    // resolve(err)
                    resolve([err])
                }
            })
        })
    }
    Http({})
</script>